﻿using System;
using WindowsPhoneMvp.Phone;

namespace WindowsPhoneMvp
{
    /// <summary>
    /// Represents a class that is a view in a Model-View-Presenter application.
    /// </summary>
    public interface IView
    {
        /// <summary />
        bool ThrowExceptionIfNoPresenterBound { get; }

        /// <summary>
        /// Occurs at the discretion of the view. For <see cref="MvpUserControl"/>
        /// implementations (the most commonly used), this is fired during the
        /// Load event.
        /// </summary>
        event EventHandler Load;

        /// <summary>
        /// The View DataContext which is usually set to the Model
        /// </summary>
        object DataContext { get; set; }
    }
}
